﻿
/*----------------------------------------------------------------
 * 创建时间：2023/8/2 10:24:07
 * 作  者：wenlli 
 * 项  目：Minotaur.App.Domains.Dto.Flow 
 * 描  述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时  间：
 * 修改说明：
 * 
 *----------------------------------------------------------------*/


using Minotaur.App.Domains.Enum;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Minotaur.App.Domains.Dto.Flow
{
    public class FlowStepInfoDto
    {
        /// <summary>
        /// 步骤ID
        /// </summary>
        public virtual long? StepId { get; set; }
        /// <summary>
        /// 流程版本ID
        /// </summary>
        public virtual long? VersionId { get; set; }

        private PropType? _Prop;

        /// <summary>
        /// 节点中文名
        /// </summary>
        public virtual string? CNName { get; set; }

        /// <summary>
        /// 节点英文名
        /// </summary>
        public virtual string? ENName { get; set; }

        /// <summary>
        /// 节点坐标
        /// </summary>
        public virtual string? Coordinate { get; set; }
        /// <summary>
        /// 左方坐标
        /// </summary>
        public double ToLeft { get; set; }

        /// <summary>
        /// 左方坐标
        /// </summary>
        public double ToTop { get; set; }


        /// <summary>
        /// 节点类型
        /// </summary>
        public PropType? Prop
        {
            get => _Prop;
            set
            {
                _Prop = value;
                if (value != null)
                {
                    switch (value)
                    {
                        case PropType.StartNode:
                            BackGround = "#2d8cf0";
                            break;
                        case PropType.BranchNode:
                            BackGround = "#008375";
                            break;
                        case PropType.ConditionsNode:
                            BackGround = "#757575";
                            break;
                        case PropType.ApprovalNode:
                            BackGround = "#2d8cf0";
                            break;
                        case PropType.AccessNode:
                            BackGround = "#f50";
                            break;
                        case PropType.EndBranchNode:
                            BackGround = "#e41e00";
                            break;
                        case PropType.EndNode:
                            BackGround = "#616161";
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        /// <summary>
        /// 背景色
        /// </summary>
        public string BackGround { get; set; } = "#2d8cf0";
    }
}
